# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Language.V1.Model.XPSImageClassificationTrainResponse do
  @moduledoc """


  ## Attributes

  *   `classCount` (*type:* `String.t`, *default:* `nil`) - Total number of classes.
  *   `exportModelSpec` (*type:* `GoogleApi.Language.V1.Model.XPSImageExportModelSpec.t`, *default:* `nil`) - Information of downloadable models that are pre-generated as part of training flow and will be persisted in AutoMl backend. Populated for AutoMl requests.
  *   `modelArtifactSpec` (*type:* `GoogleApi.Language.V1.Model.XPSImageModelArtifactSpec.t`, *default:* `nil`) - ## The fields below are only populated under uCAIP request scope.
  *   `modelServingSpec` (*type:* `GoogleApi.Language.V1.Model.XPSImageModelServingSpec.t`, *default:* `nil`) - 
  *   `stopReason` (*type:* `String.t`, *default:* `nil`) - Stop reason for training job, e.g. 'TRAIN_BUDGET_REACHED', 'MODEL_CONVERGED', 'MODEL_EARLY_STOPPED'.
  *   `trainCostInNodeTime` (*type:* `String.t`, *default:* `nil`) - The actual cost to create this model. - For edge type model, the cost is expressed in node hour. - For cloud type model,the cost is expressed in compute hour. - Populated for models created before GA. To be deprecated after GA.
  *   `trainCostNodeSeconds` (*type:* `String.t`, *default:* `nil`) - The actual training cost, expressed in node seconds. Populated for models trained in node time.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :classCount => String.t() | nil,
          :exportModelSpec => GoogleApi.Language.V1.Model.XPSImageExportModelSpec.t() | nil,
          :modelArtifactSpec => GoogleApi.Language.V1.Model.XPSImageModelArtifactSpec.t() | nil,
          :modelServingSpec => GoogleApi.Language.V1.Model.XPSImageModelServingSpec.t() | nil,
          :stopReason => String.t() | nil,
          :trainCostInNodeTime => String.t() | nil,
          :trainCostNodeSeconds => String.t() | nil
        }

  field(:classCount)
  field(:exportModelSpec, as: GoogleApi.Language.V1.Model.XPSImageExportModelSpec)
  field(:modelArtifactSpec, as: GoogleApi.Language.V1.Model.XPSImageModelArtifactSpec)
  field(:modelServingSpec, as: GoogleApi.Language.V1.Model.XPSImageModelServingSpec)
  field(:stopReason)
  field(:trainCostInNodeTime)
  field(:trainCostNodeSeconds)
end

defimpl Poison.Decoder, for: GoogleApi.Language.V1.Model.XPSImageClassificationTrainResponse do
  def decode(value, options) do
    GoogleApi.Language.V1.Model.XPSImageClassificationTrainResponse.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Language.V1.Model.XPSImageClassificationTrainResponse do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
